﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI.Selection;

namespace Assist
{
	public class DoorFilter : ISelectionFilter
	{
		public bool AllowElement(Element elem)
		{
			try
			{
				bool flag = typeof(FamilyInstance) == elem.GetType();
				bool flag2 = elem.Category.Id.IntegerValue == -2000023;
				if (flag && flag2)
				{
					return true;
				}
			}
			catch
			{
			}
			return false;
		}

		public bool AllowReference(Reference reference, XYZ pos)
		{
			return false;
		}
	}
}
